1. /* snconstr.cpp by K.Tsuru */
  2. // function ID = 111
  3. /**************************************************************
  4. SNumber class
  5. consutructor by NumberType "tp" and the size of figure[] "fsz".
  6. It does not initialized by zero.Use SetZero() for initialization.
  7. If fsz == 0 it does not allocate memory.
  8. ***********************************************************/
  9. #ifndef SN_H
  10. #include "sn.h"
  11. #endif
  12. SNumber::SNumber( NumberType tp, uint fsz)
  13. :pushCD(0), sign(UNDECIDED), type(tp), aHead(0), aTail(0), figure(){
  14. uint max_sz = SNMaxSize(type);
  15. if( fsz > max_sz){
  16. SetError(FATAL,"SN",111);
  17. }
  18. if(fsz && fsz < minArraySize) fsz = minArraySize;
  19. //When the size which is greater than the minimum size is requested
  20. //it takes into the irreducible size mode.
  21. else if(fsz > minArraySize) CutDown(DISABLE);
  22. //If fsz > 0,it allocates memory but not initialized.
  23. //The initialization is done in the derived classes. sign = UNDECIDED;
  24. if(fsz) figure.size(fsz, -1);
  25. objectCounter++;
  26. }

snconstr.cpp : last modifiled at 2017/06/18 14:25:30(1,011 bytes)
created at 2016/04/11 11:36:47
The creation time of this html file is 2017/10/27 10:59:17 (Fri Oct 27 10:59:17 2017).